package com.dkts.oil.enumes;

import com.dkts.oil.util.gis.GpsFormat;
import com.dkts.oil.util.gis.GpsPoint;
import lombok.Getter;
import org.springframework.util.StringUtils;

/**
 * 水类型
 *
 * @author heguanglong
 * @date 2020-12-02
 */
public enum WriterTypeEnums {
    //水类型
    RIVER_AND_CANALS(41, "河渠","指天然形成或人工开挖的河流及主干常年水位以下的土地。人工渠包括堤岸"),
    LAKES(42, "湖泊","指天然形成的积水区常年水位以下的土地。 "),
    RESERVOIR_PITS_AND_PONDS(43,"水库坑塘" ,"指人工修建的蓄水区常年水位以下的土地。"),
    PERMANENT_GLACIER_SNOW(44,"永久性冰川雪地", "指常年被冰川和积雪所覆盖的土地。"),
    MUDFLAT(45,"滩涂", "指沿海大潮高潮位与低潮位之间的潮浸地带。 "),
    SHOAL(46, "滩地","指河、湖水域平水期水位与洪水期水位之间的土地。 "),
    //-103 水系列 和上面4开头类似
    RIVER_AND_CANALS_WATER(-103,"水系","自定义的"),
    //土地类型
    URBAN_LAND(51,"城镇用地", "指大、中、小城市及县镇以上建成区用地。"),
    RURAL_RESIDENTIAL_AREAS(52,"农村居民点", "指独立于城镇以外的农村居民点。 "),
    OTHER_AREA(53, "其它建设用地","指厂矿、大型工业区、油田、盐场、采石场等用地以及交通道路、机场及特殊用地 "),
    //-104 铁路
    RURAL_RESIDENTIAL_AREAS_ROAD(-104,"铁路",""),

    //-100 建筑物
    BUILDING(-100,"建筑物",""),
    //-101  路网
    BOUNDARY(-101,"路网",""),
    ;

    @Getter
    private Integer id;
    @Getter
    private String name;
    @Getter
    private String remark;


    WriterTypeEnums(Integer id, String name,String remark) {
        this.name = name;
        this.id = id;
        this.remark = remark;
    }

    public static boolean check(Integer type) {
        WriterTypeEnums[] failReason =   WriterTypeEnums.values();
        for (WriterTypeEnums failReasons : failReason) {
            if (failReasons.getId().equals(type)) {
                return true;
            }
        }
        throw new RuntimeException("gpsType不支持");
    }
}
